package 面试相关;

import java.util.Scanner;

public class _双色球 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int r = scanner.nextInt(),r_num = 0;
        int b = scanner.nextInt(),b_num = 0;
        scanner.nextLine();
        String s = scanner.nextLine();
        char[] chars = s.toCharArray();
        int i = 0,j =  i + 1;
        while (j < n  - 1){
            if(chars[i] == chars[j]){
                if(chars[i] == 'r'){
                    b_num++;
                }else if(chars[j] == 'b'){
                    r_num++;
                }
            }else{
                i = j;
            }
            j++;
        }
        if(r_num <= r && b_num <= b){
            System.out.println(n + r_num + b_num);
        }else{
            System.out.println((r_num > r ? r_num - r : 0) + " " + (b_num > b ? b_num - b : 0));
        }
    }
}
